@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
        .layui-table{width: 97%;margin: 0 auto;margin-top: 20px;}
        .modal-func-btns {justify-content: flex-start !important;}
        .layui-form-select dl {min-width: 86%;}
        .new-table {margin: 20px 0;}
    </style>
@endsection
@include('Home.User.Common._meta')
<!----  职位 已投递简历  ---->
<div class="modal-content new-table" id="addNew-content2">
    <div class="layui-form">
        <table class="layui-table">
            <thead>
            <tr>
                <th>ID</th>
                <th>上传时间</th>
                <th>姓名</th>
                <th>性别</th>
                <th>出生年月</th>
                <th>国籍</th>
                <th>学历</th>
                <th>工作经验</th>
                <th>简历来源</th>
                <th>简历归属</th>
                <th>求职职位</th>
                <th>求职状态</th>
                <th>推荐结果</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>

            @foreach($list as $item)
                <tr>
                    <td data-label="ID"> {{$item->resume->id}} </td>
                    <td data-label="上传时间"> {{$item->resume->created_at}} </td>
                    <td data-label="姓名"> {{$item->resume->name}} </td>
                    <td data-label="性别"> {{$item->resume->sex}} </td>
                    <td data-label="出生年月"> {{$item->resume->birthday}} </td>
                    <td data-label="国籍"> {{$item->resume->nationality}} </td>
                    <td data-label="学历"> {{$item->resume->education}} </td>
                    <td data-label="工作经验"> {{$item->resume->experience}} </td>
                    <td data-label="简历来源"> {{$item->user_type}}{{$item->username}}</td>
                    <td data-label="简历归属"> {{$item->assign_username}} </td>
                    <td data-label="求职职位"> {{$item->resume->position_name}} </td>
                    <td data-label="求职状态"> {{$item->resume->state_name}} </td>
                    <td data-label="推荐结果"> {{$item->result_name}} </td>
                    <td data-label="操作" class="tac layui-row layui-col-space10">
                        <?php $user = Auth::user()->load('frame'); ?>
                        @if(Auth::user()->type==1 && $user->frame && $user->frame->branch_id==1)
                            <a href="javascript:;" class="edit-btn edit-client" onclick="open_button('{{route('resume_edit',$item->resume->id)}}','查看/编辑简历')" title="查看/编辑简历"><i class="layui-icon">&#xe642;</i></a>
                            <a href="javascript:;" class="edit-btn edit-client" onclick="open_button('{{route('add_position_schedule',$item->id)}}','查看/添加跟进记录')" title="查看/添加跟进记录"><i class="layui-icon">&#xe63c;</i></a>
                        @endif
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>

        <!-- 分页 s -->
        @if($num>1)
            <div class="news-pager">
                <ul class="pagination" id="page">
                </ul>
                <div class="pageJump">
                    <span>跳转到</span>
                    <input type="text"/>
                    <span>页</span>
                    <button type="button" class="button">确定</button>
                </div>
            </div>
        @endif
        <!-- 分页 e -->
    </div>

</div>
@section('footer')
    <script type="text/javascript">
        layui.use('form', function(){
            var form = layui.form;
            var $ = layui.jquery;
            form.on('checkbox(allChoose)', function(data) {
                var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
                child.each(function(index, item) {
                    item.checked = data.elem.checked;
                });
                form.render('checkbox');
            });
        });

        /***  分页 JS  ***/
        Page({
            num: '{{$num}}',		//页码数
            startnum: '{{$page}}',				//指定页码
            elem:$('#page'),		//指定的元素
            callback:function(n){	//回调函数
                window.location.href = '{{route('position_resume',$obj->id)}}?page='+n;
            }
        });
    </script>
@endsection
@include('Home.User.Common._footer')
@include('Home.User.Common._form')